<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">

	<head>
		<meta charset="UTF-8">
		<title>sinocare</title>
		<meta name="renderer" content="webkit">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<link rel="shortcut icon" href="/favicon.ico" type="image/x-icon" />
		<link rel="stylesheet" href="../css/font.css">
		<link rel="stylesheet" href="../css/xadmin.css">
		<script src="../js/jquery.min.js"></script>
		<script type="text/javascript" src="../lib/layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="../js/xadmin.js"></script>
		<script src="../js/echarts.min.js"></script>
<script src="../js/dark.js"></script>
<script src="../js/infographic.js"></script></head>
		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
      <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
      <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
    <script src="../js/vue.js"></script>
	</head>

	<body class="layui-anim layui-anim-up">
		<div class="x-nav">
			<span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">报表管理</a>
        <a>
          <cite>月度数据报表</cite></a>
      </span>
			<a class="layui-btn layui-btn-primary layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
				<i class="layui-icon" style="line-height:38px">ဂ</i></a>
		</div>
		<div class="x-body">
			<xblock >
		<div align="center"><font style="font-size: 16px;">2019-10月份数据报表</font></div>
			</xblock>
			<!--
            	简洁选项卡
           -->
 <div class="layui-card-body" id="yuedu_btu">
            <div class="layui-tab layui-tab-brief" lay-filter="component-tabs-brief">
              <ul class="layui-tab-title">
                <li class="layui-this">服务人群画像</li>
                <li>检测排名</li>
                <li>指标异常数据统计</li>
             <li>指标异常人群分布</li>
              </ul> 
              <div class="layui-tab-content">
                <div class="layui-tab-item layui-show">
                	<!--
                    服务人群画像折线图
                    -->
                    <div ><font style="font-size: 16px;">每日检测人数变化曲线图</font></div>
               <div id="fenxi" style="width: 800px; height: 300px; margin-left: 240px;"></div>
                </div>
                <div class="layui-tab-item">
                	<br />
                	   <div ><font style="font-size: 16px;">检测量最大单店：{{CommonResult.data.bnameCountMax.bname}}   检测量共计{{CommonResult.data.bnameCountMax.count}}次</font></div>
                	<!--
                    	检测量
                    --><br />
                	   <table class="layui-table">
        <thead>
          <tr>
            <th>排名</th>
            <th>总店名称</th>
            <th>分店名称</th>
          <th>检测量</th>
            </tr>
        </thead>
        <tbody>
        	 <tr v-for="(commonResult,index) in CommonResult.data.queryCountByBname">
                <td>{{index+1}}</td>
                <td>{{commonResult.hname}}</td>
                <td>{{commonResult.bname}}</td>
                <td>{{commonResult.count}}</td>
             </tr>
        </tbody>
      </table>
      <br />
        <div ><font style="font-size: 16px;">异常率最高单店：{{CommonResult.data.maxMityBname.bname}} 所有指标异常率：{{CommonResult.data.maxMityBname.avgmity}}</font></div>
            <br />
            <table class="layui-table">
                <thead>
                <tr>
                    <th>排名</th>
                    <th>总店名称</th>
                    <th>分店名称</th>
                    <th>指标异常人数</th>
                    <th>指标异常率</th>
                </tr>
                </thead>
        <tbody>
            <tr v-for="(queryMityPeople,index) in CommonResult.data.queryMityPeople">
                <th>{{index+1}}</th>
                <th>{{queryMityPeople.hname}}</th>
                <th>{{queryMityPeople.bname}}</th>
                <th>{{queryMityPeople.count}}</th>
                <th>{{queryMityPeople.avgmity}}</th>
            </tr>
        </tbody>
      </table>
                </div>
                <div class="layui-tab-item">
                	
                		<br />
                	   <div ><font style="font-size: 16px;">检测指标异常数据统计表</font></div>
                	<!--
                    	检测量
                    --><br />
                	   <table class="layui-table">
        <thead>
          <tr>
            <th>指标</th>
            <th>检测人次</th>
            <th>异常人数</th>
          <th>指标异常率</th>
           <th>低于标准值人数</th>
            <th>高于标准值人数</th>
            </tr>
        </thead>
        <tbody>
        	 <tr>
           
            <td>血糖</td>
            <td>83</td>
            <td>50</td>
           <td>60.2%</td>
            <td>11</td>
             <td>39</td>
          </tr>
          <tr>
           
            <td>甘油三脂</td>
        
            <td>83</td>
            <td>79</td>
            <td>95.2</td>
            <td>2</td>
            <td>77</td>
          </tr>
          <tr>
           
            <td>总胆固醇</td>
            <td>78</td>
            <td>37</td>
            <td>47.4</td>
             <td>16</td>
            <td>21</td>
          </tr>
          <tr>
           
            <td>高密度脂蛋白胆固醇</td>
            <td>79</td>
            <td>75</td>
            <td>94.9</td>
              <td>6</td>
            <td>69</td>
          </tr>
          <tr>
           <td>低密度脂蛋白胆固醇</td>
            <td>76</td>
            <td>63</td>
            <td>82.9</td>
              <td>22</td>
            <td>41</td>
          </tr>
          
        </tbody>
      </table>
                </div>
                 <div class="layui-tab-item">
                	<br />
                	   <div ><font style="font-size: 16px;">检测指标异常率人群分布统计表</font></div>
                	<!--
                    	检测量
                    --><br />
                	   <table class="layui-table">
        <thead>
          <tr>
            <th>指标</th>
            <th>20岁以下</th>
            <th>21-29岁</th>
          <th>30-39岁</th>
           <th>40-49岁</th>
            <th>50-59岁</th>
             <th>60-69岁</th>
              <th>70岁以上</th>
            </tr>
        </thead>
        <tbody>
        	 <tr>
           
            <td>血糖</td>
            <td>66.67%</td>
            <td>40%</td>
           <td>85%</td>
            <td>66.67%</td>
             <td>47.37%</td>
             <td>50%</td>
           <td>100%</td>
          </tr>
          <tr>
           
            <td>甘油三脂</td>
         <td>100%</td>
            <td>96%</td>
           <td>100%</td>
            <td>83.33%</td>
             <td>100%</td>
             <td>50%</td>
           <td>100%</td>
          </tr>
          <tr>
           
            <td>总胆固醇</td>
           <td>57.14%</td>
            <td>55%</td>
           <td>35.29%</td>
            <td>0%</td>
             <td>68.42%</td>
             <td>100%</td>
           <td>100%</td>
          </tr>
          <tr>
           
            <td>高密度脂蛋白胆固醇</td>
           <td>85.71%</td>
            <td>95.24%</td>
           <td>100%</td>
            <td>66.67%</td>
             <td>47.37%</td>
             <td>50%</td>
           <td>100%</td>
          </tr>
          <tr>
           <td>低密度脂蛋白胆固醇</td>
           <td>71.43%</td>
            <td>78.95%</td>
           <td>68.75%</td>
            <td>83.33%</td>
             <td>100%</td>
             <td>100%</td>
           <td>100%</td>
          </tr>
          
        </tbody>
      </table>
                     
                </div>
     
              </div>
            </div>
          </div>
			<div class="page">
				<div>
					<a class="prev" href="">&lt;&lt;</a>
					<a class="num" href="">1</a>
					<span class="current">2</span>
					<a class="num" href="">3</a>
					<a class="num" href="">489</a>
					<a class="next" href="">&gt;&gt;</a>
				</div>
					<span class="x-right" style="line-height:40px">共有数据：88 条</span>
			</div>

		</div>
		<script>

			layui.use('laydate', function() {
				var laydate = layui.laydate;

				//执行一个laydate实例
				laydate.render({
					elem: '#start' //指定元素
				});

				//执行一个laydate实例
				laydate.render({
					elem: '#end' //指定元素
				});
			});

			/*用户-停用*/
			function member_stop(obj, id) {
				layer.confirm('确认要停用吗？', function(index) {

					if($(obj).attr('title') == '启用') {

						//发异步把用户状态进行更改
						$(obj).attr('title', '停用')
						$(obj).find('i').html('&#xe62f;');

						$(obj).parents("tr").find(".td-status").find('span').addClass('layui-btn-disabled').html('已停用');
						layer.msg('已停用!', {
							icon: 5,
							time: 1000
						});

					} else {
						$(obj).attr('title', '启用')
						$(obj).find('i').html('&#xe601;');

						$(obj).parents("tr").find(".td-status").find('span').removeClass('layui-btn-disabled').html('已启用');
						layer.msg('已启用!', {
							icon: 5,
							time: 1000
						});
					}

				});
			}

			/*用户-删除*/
			function member_del(obj, id) {
				layer.confirm('确认要删除吗？', function(index) {
					//发异步删除数据
					$(obj).parents("tr").remove();
					layer.msg('已删除!', {
						icon: 1,
						time: 1000
					});
				});
			}

			function delAll(argument) {

				var data = tableCheck.getData();

				layer.confirm('确认要删除吗？' + data, function(index) {
					//捉到所有被选中的，发异步进行删除
					layer.msg('删除成功', {
						icon: 1
					});
					$(".layui-form-checked").not('.header').parents('tr').remove();
				});
			}
		</script>
	</body>

</html>

<script type="text/javascript">

    $(function () {
        var yuedu_btu = new Vue({
            el:"#yuedu_btu",

            data(){
                return{
                    CommonResult:{
                        data:""
                    },
                };
            },

            mounted(){
                var _this = this;
                $.ajax({
                    url:"/getBnameSumInHname",
                    type:"POST",
                    success:function (result) {
                        _this.CommonResult = result;
                        console.log(_this.CommonResult);
                    }
                });
            },
        })
    })





		var fenxi= echarts.init(document.getElementById('fenxi'),
				'infographic');
				option = {
    xAxis: {
        type: 'category',
          boundaryGap: false,
        data: [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31]
    },
    yAxis: {
        type: 'value',
        max:24
    },
    series: [{
        data: [0,0,0,0,0,0,0,0,0,1,0,6,2,0,0,0,0,1,1,3,0,0,5,12,4.5,3,4,0,0,2,14.5],
        type: 'line',
          smooth: true
    }]
};

				<!--使用指定的配置项和数据显示图表-->
		fenxi.setOption(option);
</script>
